package cn.clouds234.csv;

import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;

/**
 * csv文件导入导出入口
 * @author wyf
 * @date 2025/4/27 16:16
 */
public class CsvClient {
    public static void main(String[] args) throws IOException {
        importToList();
    }

    public static void exportFromList(){

    }

    public static void importToList() throws IOException {
        String csvStr = "name,age,bothday\n" +
                "tom,13,2025-04-27\n" +
                "jerry,14,2025-04-27";

        List<UserInfo> read = CsvUtil.read(",", new ByteArrayInputStream(csvStr.getBytes(StandardCharsets.UTF_8)), UserInfo.class);
        System.out.printf("====");

    }
}
